import { ref } from 'vue'
import { defineStore } from 'pinia'
import {getCategoryList} from '@/apis/layout'

export const useCategoryStore = defineStore('category', () => {

    // 导航列表数据
    const list=ref([])

    //导航数据的方法
    const getCategory=async()=>{
      const res=await getCategoryList()
      list.value=res.result
    }
    
    return{
        list,
        getCategory
    }
})
